package x.ovo.wechat.bot;

import cn.hutool.db.nosql.redis.RedisDS;
import lombok.extern.slf4j.Slf4j;
import redis.clients.jedis.Jedis;
import x.ovo.wechat.bot.common.command.CommandExecutor;
import x.ovo.wechat.bot.common.event.Event;
import x.ovo.wechat.bot.common.event.EventListener;
import x.ovo.wechat.bot.common.plugin.Plugin;

@Slf4j
public class TestPlugin extends Plugin {
    @Override
    public void onEnable() {
    }

    @Override
    public void onDisable() {

    }

    @Override
    public void onLoad() {
        Jedis jedis = RedisDS.create().getJedis();
        log.info("redis: {}", jedis.ping());
    }

    @Override
    public CommandExecutor getCommandExecutor() {
        return null;
    }


    @Override
    public EventListener<? extends Event<?>> getEventListener() {
        return new TestEventListener();
    }
}
